package cn.com.simple.learning.rabbitmq.controller;

import cn.com.simple.learning.rabbitmq.mq.producer.MyProducer;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Jianxing.Jia
 * @date 2022/5/25
 * @description 描述信息
 */
@RestController
public class StreamDelayController {

    private final MyProducer myProducer;

    public StreamDelayController(MyProducer myProducer) {
        this.myProducer = myProducer;
    }

    @RequestMapping("/stream/send")
    public void send(String message) {
        myProducer.send(message);
    }

}
